# SQL Manager 2005 Lite for MySQL 3.7.6.2
# ---------------------------------------
# Host     : localhost
# Port     : 3306
# Database : miming


SET FOREIGN_KEY_CHECKS=0;

DROP DATABASE IF EXISTS `miming`;

CREATE DATABASE `miming`
    CHARACTER SET 'latin1'
    COLLATE 'latin1_swedish_ci';

USE `miming`;

#
# Structure for the `accounts` table : 
#

CREATE TABLE `accounts` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `bill_items` table : 
#

CREATE TABLE `bill_items` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `BId` int(10) unsigned default NULL,
  `ItemId` int(10) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `billing_rate_levels` table : 
#

CREATE TABLE `billing_rate_levels` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `bills` table : 
#

CREATE TABLE `bills` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Date` datetime default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `classes` table : 
#

CREATE TABLE `classes` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `ParentId` int(10) unsigned default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `company` table : 
#

CREATE TABLE `company` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `customer_messages` table : 
#

CREATE TABLE `customer_messages` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Message` varchar(45) default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `customer_types` table : 
#

CREATE TABLE `customer_types` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `ParentId` int(10) unsigned default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `customers` table : 
#

CREATE TABLE `customers` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `employees` table : 
#

CREATE TABLE `employees` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Title` varchar(45) default NULL,
  `LastName` varchar(45) default NULL,
  `FirstName` varchar(45) default NULL,
  `MiddleName` varchar(45) default NULL,
  `PrintOnCheckAs` varchar(45) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `invoice_items` table : 
#

CREATE TABLE `invoice_items` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `IId` int(10) unsigned default NULL,
  `ItemId` int(10) unsigned default NULL,
  `Quantity` double default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `invoices` table : 
#

CREATE TABLE `invoices` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Date` datetime default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `item_receipt_items` table : 
#

CREATE TABLE `item_receipt_items` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `IRId` int(10) unsigned default NULL,
  `ItemId` int(10) unsigned default NULL,
  `Quantity` double default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `item_receipts` table : 
#

CREATE TABLE `item_receipts` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Date` datetime default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `items` table : 
#

CREATE TABLE `items` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `job_types` table : 
#

CREATE TABLE `job_types` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `ParentId` int(10) unsigned default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `payment_methods` table : 
#

CREATE TABLE `payment_methods` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `Type` int(10) unsigned default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `price_levels` table : 
#

CREATE TABLE `price_levels` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `purchase_order_items` table : 
#

CREATE TABLE `purchase_order_items` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `POId` int(10) unsigned default NULL,
  `ItemId` int(10) unsigned default NULL,
  `Quantity` double default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `purchase_orders` table : 
#

CREATE TABLE `purchase_orders` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Date` datetime default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `sales_receipt_items` table : 
#

CREATE TABLE `sales_receipt_items` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `SRId` int(10) unsigned default NULL,
  `ItemId` int(10) unsigned default NULL,
  `Quantity` double default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `sales_receipts` table : 
#

CREATE TABLE `sales_receipts` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Date` datetime default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `sales_tax_codes` table : 
#

CREATE TABLE `sales_tax_codes` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Code` varchar(45) default NULL,
  `Description` varchar(45) default NULL,
  `Taxable` tinyint(3) unsigned default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `terms` table : 
#

CREATE TABLE `terms` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `todos` table : 
#

CREATE TABLE `todos` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Note` varchar(45) default NULL,
  `RemindOn` datetime default NULL,
  `Done` tinyint(3) unsigned default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `units` table : 
#

CREATE TABLE `units` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `SetName` varchar(45) default NULL,
  `Name` varchar(45) default NULL,
  `Abbreviation` varchar(45) default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `users` table : 
#

CREATE TABLE `users` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `Password` varchar(45) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `vendor_types` table : 
#

CREATE TABLE `vendor_types` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  `ParentId` int(10) unsigned default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `vendors` table : 
#

CREATE TABLE `vendors` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Name` varchar(45) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Structure for the `workers_comps` table : 
#

CREATE TABLE `workers_comps` (
  `Id` int(10) unsigned NOT NULL auto_increment,
  `Code` varchar(45) default NULL,
  `Description` varchar(45) default NULL,
  `Rate` double default NULL,
  `StartUsingOn` datetime default NULL,
  `Inactive` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# Data for the `accounts` table  (LIMIT 0,500)
#

INSERT INTO `accounts` (`Id`, `Name`) VALUES 
  (1,'Account 1'),
  (2,'Account 1'),
  (3,'Account 1'),
  (4,'Account 1'),
  (5,'Account 1'),
  (6,'Account 1'),
  (7,'Account 1'),
  (8,'Account 1'),
  (9,'Account 1'),
  (10,'Account 1'),
  (11,'Account 1');

COMMIT;

#
# Data for the `billing_rate_levels` table  (LIMIT 0,500)
#

INSERT INTO `billing_rate_levels` (`Id`, `Name`, `Inactive`) VALUES 
  (1,'',0),
  (2,'',0),
  (3,'',0),
  (4,'',0),
  (5,'',0),
  (6,'',0),
  (7,'',0);

COMMIT;

#
# Data for the `bills` table  (LIMIT 0,500)
#

INSERT INTO `bills` (`Id`, `Date`) VALUES 
  (1,'2009-08-25 20:33:59'),
  (2,'2009-08-25 20:34:30'),
  (3,'2009-08-25 20:34:57'),
  (4,'2009-08-25 20:35:25');

COMMIT;

#
# Data for the `classes` table  (LIMIT 0,500)
#

INSERT INTO `classes` (`Id`, `Name`, `ParentId`, `Inactive`) VALUES 
  (1,'Class 1',NULL,0),
  (2,'Class 1',NULL,0),
  (3,'Class 1',NULL,0),
  (4,'Class 1',NULL,0),
  (5,'Class 1',NULL,0);

COMMIT;

#
# Data for the `customer_messages` table  (LIMIT 0,500)
#

INSERT INTO `customer_messages` (`Id`, `Message`, `Inactive`) VALUES 
  (1,'',0),
  (2,'',0),
  (3,'',0),
  (4,'',0);

COMMIT;

#
# Data for the `customer_types` table  (LIMIT 0,500)
#

INSERT INTO `customer_types` (`Id`, `Name`, `ParentId`, `Inactive`) VALUES 
  (1,'',NULL,0),
  (2,'',NULL,0),
  (3,'',NULL,0),
  (4,'',NULL,0);

COMMIT;

#
# Data for the `customers` table  (LIMIT 0,500)
#

INSERT INTO `customers` (`Id`, `Name`) VALUES 
  (1,''),
  (2,''),
  (3,''),
  (4,'');

COMMIT;

#
# Data for the `employees` table  (LIMIT 0,500)
#

INSERT INTO `employees` (`Id`, `Title`, `LastName`, `FirstName`, `MiddleName`, `PrintOnCheckAs`) VALUES 
  (1,'','','','','');

COMMIT;

#
# Data for the `item_receipts` table  (LIMIT 0,500)
#

INSERT INTO `item_receipts` (`Id`, `Date`) VALUES 
  (1,'2009-08-25 20:33:58'),
  (2,'2009-08-25 20:34:30'),
  (3,'2009-08-25 20:34:57'),
  (4,'2009-08-25 20:35:25');

COMMIT;

#
# Data for the `items` table  (LIMIT 0,500)
#

INSERT INTO `items` (`Id`, `Name`) VALUES 
  (1,'Item 1'),
  (2,'Item 2'),
  (3,'Item 3'),
  (4,'Item 1'),
  (5,'Item 2'),
  (6,'Item 3'),
  (7,'Item 1'),
  (8,'Item 2'),
  (9,'Item 3'),
  (10,'Item 1'),
  (11,'Item 2'),
  (12,'Item 3'),
  (13,'Item 1'),
  (14,'Item 2'),
  (15,'Item 3'),
  (16,'Item 1'),
  (17,'Item 2'),
  (18,'Item 3');

COMMIT;

#
# Data for the `job_types` table  (LIMIT 0,500)
#

INSERT INTO `job_types` (`Id`, `Name`, `ParentId`, `Inactive`) VALUES 
  (1,'',NULL,0),
  (2,'',NULL,0),
  (3,'',NULL,0),
  (4,'',NULL,0);

COMMIT;

#
# Data for the `payment_methods` table  (LIMIT 0,500)
#

INSERT INTO `payment_methods` (`Id`, `Name`, `Type`, `Inactive`) VALUES 
  (1,'',1,0),
  (2,'',1,0),
  (3,'',1,0),
  (4,'',1,0);

COMMIT;

#
# Data for the `price_levels` table  (LIMIT 0,500)
#

INSERT INTO `price_levels` (`Id`, `Name`, `Inactive`) VALUES 
  (1,'',0),
  (2,'',0),
  (3,'',0),
  (4,'',0);

COMMIT;

#
# Data for the `purchase_orders` table  (LIMIT 0,500)
#

INSERT INTO `purchase_orders` (`Id`, `Date`) VALUES 
  (1,'2009-08-25 20:33:58'),
  (2,'2009-08-25 20:34:30'),
  (3,'2009-08-25 20:34:57'),
  (4,'2009-08-25 20:35:25');

COMMIT;

#
# Data for the `sales_tax_codes` table  (LIMIT 0,500)
#

INSERT INTO `sales_tax_codes` (`Id`, `Code`, `Description`, `Taxable`, `Inactive`) VALUES 
  (1,'CC','',1,0),
  (2,'CC','',1,0),
  (3,'CC','',1,0),
  (4,'CC','',1,0),
  (5,'CC','',1,0),
  (6,'CC','',1,0);

COMMIT;

#
# Data for the `terms` table  (LIMIT 0,500)
#

INSERT INTO `terms` (`Id`, `Name`, `Inactive`) VALUES 
  (1,'',0),
  (2,'',0),
  (3,'',0),
  (4,'',0),
  (5,'',0),
  (6,'',0),
  (7,'',0),
  (8,'',0);

COMMIT;

#
# Data for the `units` table  (LIMIT 0,500)
#

INSERT INTO `units` (`Id`, `SetName`, `Name`, `Abbreviation`, `Inactive`) VALUES 
  (1,'Count in each','Each','ea',0),
  (2,'Count in each','Each','ea',0),
  (3,'Count in each','Each','ea',0),
  (4,'Count in each','Each','ea',0),
  (5,'Count in each','Each','ea',0),
  (6,'Count in each','Each','ea',0),
  (7,'Count in each','Each','ea',0),
  (8,'Count in each','Each','ea',0),
  (9,'Count in each','Each','ea',0),
  (10,'Count in each','Each','ea',0),
  (11,'Count in each','Each','ea',0);

COMMIT;

#
# Data for the `users` table  (LIMIT 0,500)
#

INSERT INTO `users` (`Id`, `Name`, `Password`) VALUES 
  (1,'admin','root');

COMMIT;

#
# Data for the `vendor_types` table  (LIMIT 0,500)
#

INSERT INTO `vendor_types` (`Id`, `Name`, `ParentId`, `Inactive`) VALUES 
  (1,'',NULL,0),
  (2,'',NULL,0),
  (3,'',NULL,0),
  (4,'',NULL,0),
  (5,'',NULL,0),
  (6,'',NULL,0),
  (7,'',NULL,0),
  (8,'',NULL,0),
  (9,'',NULL,0),
  (10,'',NULL,0);

COMMIT;

#
# Data for the `vendors` table  (LIMIT 0,500)
#

INSERT INTO `vendors` (`Id`, `Name`) VALUES 
  (1,'Vendor 1'),
  (2,'Vendor 1'),
  (3,'Vendor 1'),
  (4,'Vendor 1'),
  (5,'Vendor 1'),
  (6,'Vendor 1'),
  (7,'Vendor 1');

COMMIT;

#
# Data for the `workers_comps` table  (LIMIT 0,500)
#

INSERT INTO `workers_comps` (`Id`, `Code`, `Description`, `Rate`, `StartUsingOn`, `Inactive`) VALUES 
  (1,'','',0,'2009-11-25 20:34:58',0),
  (2,'','',0,'2009-11-25 20:35:26',0);

COMMIT;

